package com.iu.eblood.model;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the BLOODREQUESTREQUIREMENT database table.
 * 
 */
@Embeddable
public class BloodrequestrequirementPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;
	private long bloodrequestid;
	private int bloodgroupid;

    public BloodrequestrequirementPK() {
    }

	public long getBloodrequestid() {
		return this.bloodrequestid;
	}
	public void setBloodrequestid(long bloodrequestid) {
		this.bloodrequestid = bloodrequestid;
	}

	public int getBloodgroupid() {
		return this.bloodgroupid;
	}
	public void setBloodgroupid(int bloodgroupid) {
		this.bloodgroupid = bloodgroupid;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof BloodrequestrequirementPK)) {
			return false;
		}
		BloodrequestrequirementPK castOther = (BloodrequestrequirementPK)other;
		return 
			(this.bloodrequestid == castOther.bloodrequestid)
			&& (this.bloodgroupid == castOther.bloodgroupid);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + ((int) (this.bloodrequestid ^ (this.bloodrequestid >>> 32)));
		hash = hash * prime + this.bloodgroupid;
		
		return hash;
    }
}